Skip to content

Conversation

radarhere
Copy link
Member

Resolves #9136

Currently, ImageOps.expand() doesn't consider palette modes.

palette = ImagePalette.ImagePalette(palette=image.getpalette())

This fixes that.

@hugovk hugovk merged commit 8c42abd into python-pillow:main Oct 10, 2025
49 checks passed
@radarhere radarhere deleted the expand branch October 10, 2025 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ImageOps.expand removes the alpha channel of palettes
2 participants